import tkinter as tk
from tkinter.constants import BOTTOM, TOP

top = tk.Tk()
top.title('Hello Tk')
top.geometry('640x480+100+100')
top.resizable(True, False)
label1 = tk.Label(top, text = 'label1top')
label1.pack(side=tk.TOP)
label2 = tk.Label(top, text = 'label2top')
label2.pack(side=tk.TOP)
label3 = tk.Label(top, text = 'label1bottom')
label3.pack(side=tk.BOTTOM)
label4 = tk.Label(top, text = 'label2bottom')
label4.pack(side=tk.BOTTOM)
label5 = tk.Label(top, text = 'label1left')
label5.pack(side=tk.LEFT)
label6 = tk.Label(top, text = 'label2left')
label6.pack(side=tk.LEFT)
label7 = tk.Label(top, text = 'label1right')
label7.pack(side=tk.RIGHT)
label8 = tk.Label(top, text = 'label2right')
label8.pack(side=tk.RIGHT)

top.mainloop()
